package com.company.aicrawlers.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.company.aicrawlers.entity.AnalysisQuestionResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 问句分析结果Mapper
 *
 * @author AI Crawlers Team
 * @date 2025-10-11
 */
@Mapper
public interface AnalysisQuestionResultMapper extends BaseMapper<AnalysisQuestionResult> {

    /**
     * 根据分析ID查询问句列表
     */
    List<AnalysisQuestionResult> getByAnalysisId(@Param("analysisId") Long analysisId);

    /**
     * 根据分析ID和问句ID查询详情
     */
    AnalysisQuestionResult getByAnalysisIdAndQuestionId(
            @Param("analysisId") Long analysisId,
            @Param("questionId") Long questionId);

    /**
     * 批量插入
     */
    int batchInsert(@Param("list") List<AnalysisQuestionResult> list);
}

